package com.gigmissions.client;

import com.extjs.gxt.ui.client.Style.LayoutRegion;
import com.extjs.gxt.ui.client.Style.Scroll;
import com.extjs.gxt.ui.client.util.Margins;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.Dialog;
import com.extjs.gxt.ui.client.widget.button.Button;
import com.extjs.gxt.ui.client.widget.layout.BorderLayout;
import com.extjs.gxt.ui.client.widget.layout.BorderLayoutData;
import com.google.gwt.maps.client.MapWidget;

public class ChooseAddressDialog extends Dialog {
	
	private MapWidget map;
	
	private ChoosePlacemarkContainer panel; 
	
	public ChooseAddressDialog(MapWidget map,ChoosePlacemarkContainer placeMarkContainer){
		
		this.map = map;
		this.panel = placeMarkContainer;
		constructUI();
		
	}
	
	
	
	
	private void constructUI(){
		
		
		setBodyBorder(false);  
		//complex.setIcon(Examples.ICONS.side_list());  
		setHeading("Choose address:");  
		setHideOnButtonClick(true); 
		setButtons(Dialog.OKCANCEL);
		setModal(true);
		setHeight("150");
		setWidth("400");
		
		   
		BorderLayout layout = new BorderLayout();  
		setLayout(layout);  
		   			    		 	     
		BorderLayoutData data = new BorderLayoutData(LayoutRegion.CENTER, 150, 100, 250);  
		data.setMargins(new Margins(0, 5, 0, 0));  
		data.setSplit(true);  
		data.setCollapsible(true);  
		data.setFloatable(true);
		
		Button okButton = this.getButtonById("ok");
		okButton.setEnabled(false);
		panel.setOkButton(okButton);
		
		add(panel, data);  
		
	}

		
	
	

}
